/**
 *  @file SDLTimer.cpp
 *
 *  @date 19-nov-2009
 *  @author Ives van der Flaas
 */

#include "SDLTimer.h"
#include <SDL.h>

si_sdl::SDLTimer::SDLTimer():
	now(SDL_GetTicks())
{

}

double si_sdl::SDLTimer::poll() const
{
	return double(SDL_GetTicks()-now)/double(1000.0);
}

double si_sdl::SDLTimer::reset()
{
	double t = poll();
	now = SDL_GetTicks();
	return t;
}







